﻿using System;
using System.Collections.Generic;
using System.Text;
using BL;

namespace DB
{
	public class SubjectItemsDB
	{
		List<SubjectItem> items = new List<SubjectItem>();
		public SubjectItemsDB()
		{
			items.Add(new SubjectItem("ПЭ-31", "ИМЭП", LessonTypes.Лекции, 16));
			items.Add(new SubjectItem("ПЭ-31", "ПИС", LessonTypes.Практика, 32));
			items.Add(new SubjectItem("ПЭ-31", "ФК", LessonTypes.Курсовое, 32));
			items.Add(new SubjectItem("МП-31", "информатика", LessonTypes.Лекции, 16));
		}

		public List<SubjectItem> GetAllItems()
		{
			return items;
		}

		public SubjectItem FindItem(string group, string subject, LessonTypes lessonType)
		{
			foreach (SubjectItem si in items)
			{
				if (si.Group == group && si.Subject == subject && si.LessonType == lessonType)
					return si;
			}
			return null;
		}
	}
}
